using System;
using System.Collections.Generic;
using System.Text;
using flickr.api.communication;

namespace flickr.api
{
    public class Favorites : FlickrObject
    {
        public Favorites() : base() {}
        public Favorites(FlickrConnection connection) : base(connection){}
        
        public void add(string photoId)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.PhotoId, photoId);

            Send(request);
        }
        
        public Photos getList(string userId, PhotoSearchExtras extras, int perPage, int page)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.UserId, userId);
            request.AddParameter(FlickrParameterType.Extras, extras);
            request.AddParameter(FlickrParameterType.PerPage, perPage);
            request.AddParameter(FlickrParameterType.Page, page);

            return Send(request).Photos;
        }
        
        public Photos getPublicList(string userId, PhotoSearchExtras extras, int perPage, int page)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.UserId, userId);
            request.AddParameter(FlickrParameterType.Extras, extras);
            request.AddParameter(FlickrParameterType.PerPage, perPage);
            request.AddParameter(FlickrParameterType.Page, page);

            return Send(request).Photos;
        }
        
        public void remove(string photoId)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.PhotoId, photoId);

            Send(request);
        }
    }
}
